/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BusinessCase;

import Helpers.HelloWorld_hLocal;
import entity.Empresa;
import entity.Usuario;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

/**
 *
 * @author Carito
 */
@Stateless
@Path("/HelloWorld")
public class HelloWorld {
    
    @EJB   private HelloWorld_hLocal helper;
    
    @GET
    @Path("m1")
    @Produces(MediaType.TEXT_PLAIN)
    public String SignIn (@QueryParam("User") String  user,
                   @QueryParam("Pass") String  pass) 
    {
     return  helper.SignIn(user, pass);
    }
    
    @GET
    @Path("m2")
    @Produces(MediaType.APPLICATION_XML)
    public Usuario WichUser (@QueryParam("User")String  user, 
                             @QueryParam("Pass")String  pass)
    {
      return  helper.WichUser(user, pass);
    }
    
    @GET
    @Path("m3")
    @Produces(MediaType.APPLICATION_XML)
    public Empresa WichEnterprise(@QueryParam("Empresa")String  idEmpresa)
                           
    {
      return  helper.WichEnterprise(idEmpresa);
    }
}
